package cn.sendto.mapper;

import java.sql.ResultSet;
import java.sql.SQLException;

import cn.sendto.model.ClassEntity;

public class ClassMapper implements IRowMapper<ClassEntity> {

	@Override
	public ClassEntity rowMapper(ResultSet rs) throws SQLException {

		ClassEntity entity = new ClassEntity();

		try {
			entity.setClassId(rs.getInt("classid"));
			entity.setClassName(rs.getString("classname"));
		} catch (Exception e) {
			// TODO: handle exception
			e.printStackTrace();
			System.out.println("数据映射异常"+e.toString());
		}

		return entity;
	}

}

